﻿using Camc.Quality.RecordTable.FormBase;
using Camc.Quality.RecordTable.FormClass;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Camc.Quality.RecordTable.FormEntity
{
    public class 问题记录表 : TableBase
    {
        public 问题记录表(int serialNum, Guid workStepEntityId, Guid processesEntityId, int sort, string firstDrawingName, string recordElement, string abnormalRecord)
        {
            SerialNum = serialNum;
            WorkStepEntityId = workStepEntityId;
            ProcessesEntityId = processesEntityId;
            Sort = sort;

            FirstDrawingName = firstDrawingName;
            RecordElement = recordElement;
            AbnormalRecord = abnormalRecord;
        }
        public override string FormName { get; protected set; } = "问题记录表";

        public override string FirstDrawingName_DisplayName { get; protected set; } = "名称";
        public override bool FirstDrawingName_Show { get; protected set; } = true;
        public override bool FirstDrawingName_Enable { get; protected set; } = true;

        public override string RecordElement_DisplayName { get; protected set; } = "记录项目";
        public override bool RecordElement_Show { get; protected set; } = true;
        public override bool RecordElement_Enable { get; protected set; } = true;

        public override string AbnormalRecord_DisplayName { get; protected set; } = "问题记录";
        public override bool AbnormalRecord_Show { get; protected set; } = true;
        public override bool AbnormalRecord_Enable { get; protected set; } = true;

        public RecordRequirementsEntity SetRecordRequirements(RecordRequirementsEntity entity,string remark)
        {
       
            entity.SetRemarks(remark, "备注", false, true, 0);
            return entity;
        }
        public MeasuredResultEntity SetMeasuredResult(MeasuredResultEntity entity, string measuredActual)
        {
            entity.SetMeasuredActual(measuredActual, "解决措施", true, true, 0);
            return entity;
        }
        /// <summary>
        /// 插入多媒体
        /// </summary>
        public MultiMediaEntity SetMultiMedia(MultiMediaEntity entity, string photoNo)
        {
            entity.SetMultiMedia(photoNo, "多媒体", true, true, 0);
            return entity;
        }
    }
}
